// pages/components/wbutton/wbutton.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    // text: String, //显示文本
    rotate: {
      //是否启动加载
      type: [Boolean, String],
      default: false,
    },
    bgColor: {
      //按钮背景颜色
      type: String,
      default: "linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.6))",
    },
    fontColor: {
      //按钮字体颜色
      type: String,
      default: "#FFFFFF",
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    text: '登录',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    _rotate() {
      //处理值

      console.log(this.properties.rotate)
      return String(this.properties.rotate) !== 'false'
    },
  },
  attached() {
    this._rotate()
  }
})